﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/CRM.Master" CodeBehind="GOrigemLeads.aspx.cs"
    Inherits="crm.aplicacao.CRMSystem.GOrigemLeads" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <ext:GridPanel ID="GridOrigemLeads" runat="server" Title="Gerência de Origem de Leads"
        AutoScroll="true" AutoWidth="true" Height="900" AutoExpandColumn="nome">
        <Store>
            <ext:Store ID="strOrigemLeads" runat="server">
                <Reader>
                    <ext:JsonReader IDProperty="idorigemleads">
                        <Fields>
                            <ext:RecordField Name="idorigemleads" />
                            <ext:RecordField Name="nome" />
                        </Fields>
                    </ext:JsonReader>
                </Reader>
            </ext:Store>
        </Store>
        <TopBar>
            <ext:Toolbar ID="ToolbarOrigemLeads" runat="server" AutoWidth="true">
                <Items>
                    <ext:Button ID="btNovoOrigemLeads" runat="server" Text="Novo" Icon="Add">
                        <Listeners>
                            <Click Handler="#{WindowNovoOrigemLeads}.show()" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button ID="btEditarOrigemLeads" runat="server" Text="Editar" Icon="PageWhiteEdit">
                        <Listeners>
                            <Click Handler="Ext.net.DirectMethods.editar();" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button ID="btRemoverOrigemLeads" runat="server" Text="Remover" Icon="Delete">
                        <Listeners>
                            <Click Handler="Ext.net.DirectMethods.remover();" />
                        </Listeners>
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </TopBar>
        <ColumnModel ID="ColumnModel1" runat="server">
            <Columns>
                <ext:Column ColumnID="colOrigemLeads" Header="Origem" DataIndex="nome" />
            </Columns>
        </ColumnModel>
        <SelectionModel>
            <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" />
        </SelectionModel>
        <BottomBar>
            <ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="20" />
        </BottomBar>
        <LoadMask ShowMask="true" />
    </ext:GridPanel>
    <ext:Window ID="WindowNovoOrigemLeads" runat="server" Icon="TagBlueEdit" Title="Dados de Origem de Leads"
        Hidden="true" Modal="true" Width="330" AutoHeight="true" Resizable="false">
        <Items>
            <ext:FormPanel ID="FormNovoOrigemLeads" runat="server" Padding="5" Layout="Anchor"
                BodyStyle="background-color: transparent;" Header="false">
                <Items>
                    <ext:TextField ID="txtNomeOrigemLeads" runat="server" FieldLabel="Origem" AnchorHorizontal="93%"
                        AllowBlank="false" MsgTarget="Side" />
                </Items>
                <Buttons>
                    <ext:Button ID="btGravarOrigemLeads" runat="server" Text="Gravar" Icon="Disk">
                        <Listeners>
                            <Click Handler="Ext.net.DirectMethods.inserir();" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button ID="btCancelar" runat="server" Text="Cancelar" Icon="Cancel">
                        <Listeners>
                            <Click Handler="#{WindowNovoOrigemLeads}.hide();" />
                        </Listeners>
                    </ext:Button>
                </Buttons>
            </ext:FormPanel>
        </Items>
        <Listeners>
            <Close Handler="Ext.net.DirectMethods.limparCampo();" />
            <Hide Handler="Ext.net.DirectMethods.limparCampo();" />
        </Listeners>
    </ext:Window>
    <ext:Hidden ID="hdfIdOrigemLeads" runat="server" />
</asp:Content>
